<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<meta http-equiv="X-UA-Compatible" content="chrome=1" />

	<title>API - Fork CMS</title>
	<link rel="shortcut icon" href="../../../backend/favicon.ico" />
	<link rel="stylesheet" type="text/css" media="screen" href="../../../backend/core/layout/css/screen.css" />

	<link rel="stylesheet" type="text/css" media="screen" href="api.css" />
	<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="../../../backend/core/layout/css/conditionals/ie7.css" /><![endif]-->
</head>
<body id="api">
	<div id="apiHolder">
		<h1>Fork API</h1>
		<p>The Fork API allows anyone to build their own programs using the data in Fork.</p>

		<h2>Basics</h2>
		<p>The Fork API is a REST-style api.</p>
		<p>[..]</p>

		<h2>Possible methods</h2>
		<ul>
			<li><a href="#core_getapikey">core.getAPIKey</a></li>
			<li><a href="#core_getinfo">core.getInfo</a></li>
			<li><a href="#core_apple_adddevice">core.apple.addDevice</a></li>
			<li><a href="#core_apple_adddevice">core.apple.removeDevice</a></li>
		</ul>
		<ul>
			<li><a href="#blog_comments_get">blog.comments.get</a></li>
			<li><a href="#blog_comments_get_by_id">blog.comments.getById</a></li>
			<li><a href="#blog_comments_update">blog.comments.update</a></li>
			<li><a href="#blog_comments_update_status">blog.comments.updateStatus</a></li>
		</ul>
		<ul>
			<li><a href="#form_builder_get_all">form_builder.getAll</a></li>
			<li><a href="#form_builder_entries_delete">form_builder.entries.delete</a></li>
			<li><a href="#form_builder_entries_get">form_builder.entries.get</a></li>
			<li><a href="#form_builder_entries_get_by_id">form_builder.entries.getById</a></li>
		</ul>

		<h2>Core</h2>
		<h3 id="core_getapikey">core.getAPIKey</h3>
		<p>Get the API-key for a user.</p>
		<h4>Parameters</h4>
		<dl>
			<dt>email <small>string</small></dt><dd>The email address for the user.</dd>
			<dt>password <small>string</small></dt><dd>The password for the user.</dd>
		</dl>
		<h4>Return</h4>
		<p>An array with the public- and private key.</p>


		<h3 id="core_getinfo">core.getInfo</h3>
		<p>Get info about the site.</p>
		<h4>Return</h4>
		<p>An array with the information about the site/language.</p>


		<h3 id="core_apple_adddevice">core.apple.addDevice</h3>
		<p>Add a device to a user.</p>
		<h4>Parameters</h4>
		<dl>
			<dt>token <small>string</small></dt><dd>The token of the device.</dd>
		</dl>


		<h3 id="core_apple_removedevice">core.apple.removeDevice</h3>
		<p>Remove a device from a user.</p>
		<h4>Parameters</h4>
		<dl>
			<dt>token <small>string</small></dt><dd>The token of the device.</dd>
		</dl>


		<h2>Blog</h2>
		<h3 id="blog_comments_delete">blog.comments.delete</h3>
		<p>Delete multiple comments at once.</p>

		<h4>Parameters</h4>
		<dl>
			<dt>id <small>string</small></dt><dd>The id/ids of the comment(s) to update.</dd>
		</dl>

		<h3 id="blog_comments_get">blog.comments.get</h3>
		<p>Get the comments.</p>
		<h4>Parameters</h4>
		<dl>
			<dt>status <small>string (optional)</small></dt><dd>The type of comments to get. Possible values are: published, moderation, spam.</dd>
			<dt>limit <small>int (optional)</small></dt><dd>The maximum number of items to retrieve.</dd>
			<dt>offset <small>int (optional)</small></dt><dd>The offset.</dd>
		</dl>
		<h4>Return</h4>
		<p>An array with the comments</p>


		<h3 id="blog_comments_get_by_id">blog.comments.getById</h3>
		<p>Get a single comment.</p>
		<h4>Parameters</h4>
		<dl>
			<dt>id <small>int</small></dt><dd>The id of the comment.</dd>
		</dl>
		<h4>Return</h4>
		<p>An array with the comment</p>


		<h3 id="blog_comments_update">blog.comments.update</h3>
		<p>Update a comment</p>
		<h4>Parameters</h4>
		<dl>
			<dt>id <small>int</small></dt><dd>The id of the comment.</dd>
			<dt>status <small>string (optional)</small></dt><dd>The new status for the comment. Possible values are: published, moderation, spam.</dd>
			<dt>text <small>string (optional)</small></dt><dd>The new text for the comment.</dd>
			<dt>authorName <small>string (optional)</small></dt><dd>The new author for the comment.</dd>
			<dt>authorEmail <small>string (optional)</small></dt><dd>The new email for the comment.</dd>
			<dt>authorWebsite <small>string (optional)</small></dt><dd>The new website for the comment.</dd>
		</dl>

		<h3 id="blog_comments_update_status">blog.comments.updateStatus</h3>
		<p>Update the status for multiple comments at once.</p>

		<h4>Parameters</h4>
		<dl>
			<dt>id <small>array</small></dt><dd>The id/ids of the comment(s) to update.</dd>
			<dt>status <small>string</small></dt><dd>The new status for the comment. Possible values are: published, moderation, spam.</dd>
		</dl>

		<h2>FormBuilder</h2>
		<h3 id="form_builder_get_all">form_builder.getAll</h3>
		<p>Get a list of all the forms</p>
		<h4>Parameters</h4>
		<dl>
			<dt>limit <small>int (optional)</small></dt><dd>The maximum number of items to retrieve.</dd>
			<dt>offset <small>int (optional)</small></dt><dd>The offset.</dd>
		</dl>
		<h4>Return</h4>
		<p>An array with the forms.</p>

		<h3 id="form_builder_entries_delete">form_builder.entries.delete</h3>
		<p>Get a list of all the forms</p>
		<h4>Parameters</h4>
		<dl>
			<dt>id <small>int (optional)</small></dt><dd>The id of the entry.</dd>
		</dl>
		<h4>Return</h4>
		<p>An array with the forms.</p>

		<h3 id="form_builder_entries_get">form_builder.entries.get</h3>
		<p>Get the list of entries for a form</p>
		<h4>Parameters</h4>
		<dl>
			<dt>id <small>int (optional)</small></dt><dd>The id of the form.</dd>
			<dt>limit <small>int (optional)</small></dt><dd>The maximum number of items to retrieve.</dd>
			<dt>offset <small>int (optional)</small></dt><dd>The offset.</dd>
		</dl>
		<h4>Return</h4>
		<p>An array with the forms.</p>

		<h3 id="form_builder_entries_get_by_id">form_builder.entries.getById</h3>
		<p>Get a single entry</p>
		<h4>Parameters</h4>
		<dl>
			<dt>id <small>int (optional)</small></dt><dd>The id of the entry.</dd>
		</dl>
		<h4>Return</h4>
		<p>An array with the data of the entry.</p>
	</div>
</body>
</html>